<template>
  <IlmsSelect
    v-bind="$attrs"
    v-model:value="innerValue"
    v-model:label="innerLabel"
    v-model:options="selectedData"
    :columnsList="getUserColumns()"
    :selectedColumnsList="getUserColumns(['staffName', 'mobilePhone'])"
    :searchList="getUserSearchSchema()"
    :searchInfo="searchInfo"
    :api="getOrgStaffList"
    row-key="staffId"
    :field-names="{ label: 'staffName', value: 'staffId' }"
    :config="config"
    :title="title"
  />
</template>

<script name="PartyBStaffSelect" setup>
  import { pick } from 'lodash-es';
  import { chooseProps } from '@/components/Ilms/Choose/src/props.js';
  import { getOrgStaffList } from '@/views/project/createProject/common/api';
  import { getUserColumns, getUserSearchSchema } from '@/views/project/internalOperations/common/partyBStaffSelectConfig';

  const props = defineProps({
    ...pick(chooseProps, ['width', 'height', 'multiple', 'config', 'searchInfo', 'title'])
  });
  const innerValue = defineModel('value');
  const innerLabel = defineModel('label');
  const selectedData = defineModel('options');
</script>
